package com.it.you.base.string;

public class StringTest2 {
    public static void main(String[] args) {
        StringBuilder orderCode = new StringBuilder();
        orderCode.append("DY2022-1").append(",")
                .append("DY2022-2").append(",")
                .append("DY2022-3").append(",")
                .append("DY2022-4").append(",");
        System.out.println(orderCode);
        System.out.println(orderCode.length());
        orderCode.deleteCharAt(orderCode.length() - 1);
        System.out.println(orderCode);
        System.out.println(getMsg());;
    }

    public static String getMsg() {
        String msg = "游辉";
        try {
            int a = 1;
            return msg;
        } catch (Exception e) {
            System.out.println(e.getMessage());
        } finally {
            System.out.println("finally");
        }
        return "msg";
    }

    public void t(){
//        reqBody = reqBody.replaceAll("\\\"", "\"");
//        String text = "{\"Reserve\":\"\",\"CustAcctName\":\"天津和治恒昌医药有限公司\",\"TranDate\":\"20221122\",\"CustAcctId\":\"4310000000006697\",\"TranFunc\":\"02\",\"TranAmount\":\"5\",\"BankLogNo\":\"2211220395175073\",\"OtherAcctNo\":\"15000101337293\",\"SupAcctId\":\"15000101399031\",\"TranTime\":\"082621\"}";
////        text = text.replaceAll("\\\"", "\"");
////        System.out.println(text);
////        OfflineRechargeContentQry contentQry = JSON.parseObject(text, OfflineRechargeContentQry.class);
////        log.info("contentQry:" + JSON.toJSONString(contentQry));
//
//        String t = "{\"ReqInterfaceCode\":\"CLNT2001\",\"Desc\":\"01事件通知\",\"EventType\":\"EJZB001\",\"ProductId\":\"PD13004310\",\"EventContent\":\"{\\\"Reserve\\\":\\\"\\\",\\\"CustAcctName\\\":\\\"天津和治恒昌医药有限公司\\\",\\\"TranDate\\\":\\\"20221122\\\",\\\"CustAcctId\\\":\\\"4310000000006697\\\",\\\"TranFunc\\\":\\\"02\\\",\\\"TranAmount\\\":\\\"5\\\",\\\"BankLogNo\\\":\\\"2211220395231714\\\",\\\"OtherAcctNo\\\":\\\"15000101337293\\\",\\\"SupAcctId\\\":\\\"15000101399031\\\",\\\"TranTime\\\":\\\"094211\\\"}\"}\n";
//        OfflineRechargeDataQry dataQry = JSON.parseObject(t, OfflineRechargeDataQry.class);
//        log.info("dataQry:" + JSON.toJSONString(dataQry));
//        OfflineRechargeContentQry contentQry = JSON.parseObject(dataQry.getEventContent(), OfflineRechargeContentQry.class);
//        log.info("contentQry:" + JSON.toJSONString(contentQry));

        //获取请求体
//        StringBuilder reqBody = new StringBuilder();
//        try {
//            String line = null;
//            BufferedReader reader = null;
//            reader = request.getReader();
//            while (null != (line = reader.readLine())) {
//                reqBody.append(line);
//            }
//        } catch (IOException e) {
//            e.printStackTrace();
//        }
    }

}
